<html>
<head><meta charset="utf-8"><title>resolver benchmarks · t-cargo · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/index.html">t-cargo</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/resolver.20benchmarks.html">resolver benchmarks</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="230905472"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/resolver%20benchmarks/near/230905472" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/resolver.20benchmarks.html#230905472">(Mar 18 2021 at 17:26)</a>:</h4>
<p><span class="user-mention" data-user-id="120179">@Eh2406</span> Is there anything for benchmarking the resolver?  I'd like to compare some changes to see if they have an effect.</p>



<a name="230906712"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/resolver%20benchmarks/near/230906712" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/resolver.20benchmarks.html#230906712">(Mar 18 2021 at 17:33)</a>:</h4>
<p>Nothing targeted and specific. :-(<br>
One thing that is sometimes used is <code>cargo genarate-lockfile -Zon-indexupdat</code> on some medium ish project like cargo itself. or the project described at <a href="https://github.com/rust-lang/cargo/issues/8539#issue-665232827">https://github.com/rust-lang/cargo/issues/8539#issue-665232827</a> ( without the <code>-Zminimal-versions</code> that makes it hang) At this point non algorithmic changes to the resolver tend to be smaller then the noise.</p>



<a name="230907451"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/resolver%20benchmarks/near/230907451" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/resolver.20benchmarks.html#230907451">(Mar 18 2021 at 17:38)</a>:</h4>
<p>ok, thanks.  I'll contemplate maybe making something that is a little more formal.</p>
<p>A change I'm looking at will double the size of the ResolveOpts structure from 16 to 32 (it seems like rustc can't do a niche optimization through a newtype struct).  I'm curious if it will have any impact.</p>



<a name="230908609"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/resolver%20benchmarks/near/230908609" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/resolver.20benchmarks.html#230908609">(Mar 18 2021 at 17:45)</a>:</h4>
<p>I'd love to have something better! The pubgrub-rs project has invested in good benchmark infrastructure. The hard part is making sure it is representative and realistic. ( in that project we are now discovering that all the examples we have bean using are small by Cargo standards)</p>



<a name="230908821"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/resolver%20benchmarks/near/230908821" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/resolver.20benchmarks.html#230908821">(Mar 18 2021 at 17:46)</a>:</h4>
<p>Yea.  Are you using the live <a href="http://crates.io">crates.io</a> registry as a source, or do you have an artificial registry?</p>



<a name="230908932"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/resolver%20benchmarks/near/230908932" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/resolver.20benchmarks.html#230908932">(Mar 18 2021 at 17:47)</a>:</h4>
<p>It would kinda be nice to track the performance over time, but that would require doing something like a snapshot of <a href="http://crates.io">crates.io</a> to have a consistent registry to test against.</p>



<a name="230909572"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/resolver%20benchmarks/near/230909572" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/resolver.20benchmarks.html#230909572">(Mar 18 2021 at 17:51)</a>:</h4>
<p>pubgrub is using a snapshot of the elm registry. ( we have not yet figured out how to handle all the complexity of Cargos index. <br>
)</p>



<a name="230917172"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/resolver%20benchmarks/near/230917172" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/resolver.20benchmarks.html#230917172">(Mar 18 2021 at 18:39)</a>:</h4>
<p>I would be surprised if that change to <code>ResolveOpts</code> would have a noticeable difference to any end to end use case for cargo. So IMO don't hold of a functional improvement on getting good perf numbers.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>